package org.zoomdev.zoom.dao;

import org.zoomdev.zoom.dao.builder.DatabaseBuilder;

import javax.sql.DataSource;

public interface Dao {
    DataSource dataSource();

    Ar<Record> ar();

    Ar<Record> ar(String table);

    <T> Ar<T> ar(Class<T> type);

    String productName();

    <T> T execute(ConnectionExecutor executor);

    int executeUpdate(String sql, Object... args);

    <T> T executeQuery(ResultSetParser parser, String sql, Object... args);

    void setOutput(boolean output);


    DatabaseBuilder builder();

    SqlDriver sqlDriver();

    Entity entity(Class<?> type, String table);
}
